package com.learn.springbootcache.bean;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.stereotype.Repository;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;

/**
 * @author Jmy
 */
@Data
@Repository
// toBuilder=true 可以修改原来对象属性的值
@Builder(toBuilder=true)
@NoArgsConstructor
@AllArgsConstructor
public class Employee implements Serializable {

    private static final long serialVersionUID = 2519323657568596482L;

    private Integer id;
    @NotBlank(message = "name不允许为空")
    private String name;
    @NotBlank(message = "code must not null")
    private String code;
    private String orgId;
}
